Results 1 to 3 of 3

Thread: [B]declaration of glMaterialfv's content ![/B]

  1. #1
    Guest

    [B]declaration of glMaterialfv's content ![/B]

    I declared
    GLfloat RedSurface[]={1.0f,0.0f,0.0f,1.0f};
    to use it with
    glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, RedSurface).

    How am I suppose to use the variable correctly to get no copmpile error ?

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: [B]declaration of glMaterialfv's content ![/B]

    These lines give me no compile error with DevC++.

    What is your error and compiler ?

  3. #3
    Senior Member Regular Contributor
    Join Date
    Sep 2001
    Location
    Eastern USA
    Posts
    218

    Re: [B]declaration of glMaterialfv's content ![/B]

    Are you sure the error is not due to a missing semicolon, error on the previous line? There is really not much information here to go on, it looks ok. Did you remember to include gl.h?

Similar Threads

  1. glMaterialfv( )
    By Chaitra CJ in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 03-08-2012, 09:44 PM
  2. glMaterialfv and gl_FrontMaterial ?
    By Jochen in forum OpenGL: GLSL
    Replies: 10
    Last Post: 03-18-2009, 12:23 PM
  3. glMaterialfv and GLSL shaders
    By Joe Montana in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 08-20-2005, 04:12 PM
  4. how to use glMaterialfv()
    By IAstudent in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 04-27-2004, 01:07 AM
  5. error C2664: 'glMaterialfv'
    By gerire in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 11-26-2002, 04:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean