Results 1 to 2 of 2

Thread: Overflow

  1. #1
    Member Contributor
    Join Date
    Jul 2003
    Location
    va beach
    Posts
    63

    Overflow

    I get a compile warning overflow in Constant expression.

    <QUOTE>BYTE Texture[] = {BMP1, BMP2, BMP3};</QUOTE>

    This is based on NeHe 's tut #38.

    Using LCC Win32 Builder.

    The displayed textures are wrong. Only one texture is bieng loaded, and I feel it is from this Warning.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: Overflow

    Would have to see more of you code, but from what I remember of your last thread you posted I am thinking you still don't understand how texture loading works in openGL.

    If you are using the texture variable like in nehe's code then it should be like this:

    BYTE Texture[3]; // Space for 3 texture names, remeber openGL asigns these names.

    The byte overflow is I am guessing due to you trying to asign something other then a larger then a byte. maybe your BMP? values are not correct.

    // Here is how to store file names for loading textures.
    char *textureList[] = {"texture1.bmp","texture2.bmp","texture3.bmp"};


    then in your loading routine, would look something like this:

    for(i=0; i<3; i++)
    {
    LoadBMP(textureList[i]);
    }


    Originally posted by c0d3Junk3Y:
    I get a compile warning overflow in Constant expression.

    <QUOTE>BYTE Texture[] = {BMP1, BMP2, BMP3};</QUOTE>

    This is based on NeHe 's tut #38.

    Using LCC Win32 Builder.

    The displayed textures are wrong. Only one texture is bieng loaded, and I feel it is from this Warning.


    [This message has been edited by nexusone (edited 08-09-2003).]

Similar Threads

  1. Instruction number overflow...
    By capedica in forum OpenGL: GLSL
    Replies: 3
    Last Post: 04-28-2005, 11:26 PM
  2. Overflow and picking
    By zediah in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 07-17-2004, 08:11 PM
  3. How to know if i have overflow of the Video RAM?
    By ymish in forum OpenGL: Advanced Coding
    Replies: 9
    Last Post: 01-07-2004, 11:03 PM
  4. Overflow message on cs and TFC
    By JW in forum OpenGL: User Software
    Replies: 1
    Last Post: 02-16-2002, 06:11 AM
  5. PCI memory overflow on AGP
    By vs in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 03-28-2001, 03:59 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