Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - molmasepic

Pages: [1] 2 3
1
General discussions / Some GLM help xD
« on: March 07, 2011, 06:35:48 pm »
hey where can i find the right GLM(the one that loads .obj files to, opengl?)

getting lost trying to find the right one xD

EDIT: Im on Windows Vista(home)/windows 7(school)
using Code Blocks and the MinGW compiler

2
General / Bad rendering?
« on: February 28, 2011, 07:56:59 pm »
ok i loaded a smaller model, and i noticed this

http://img27.imageshack.us/i/glitchrealized.png/


if you notice, it shows only one triangle on the mesh(the big triangle that is supposed to be a square.

also it has jagged edges on it, thats not supposed to be there.


im thinking that maybe theres a glitch with the face loading but im not sure

anyone?

3
General / Bad rendering?
« on: February 28, 2011, 07:28:18 pm »
Quote from: "devlin"
And if you comment out these lines?
Code: [Select]
glEnable(GL_POLYGON_STIPPLE);



same problem

4
General / Bad rendering?
« on: February 22, 2011, 09:21:23 pm »

5
General / Bad rendering?
« on: February 22, 2011, 07:48:53 am »
nobody knows? ._.

6
General / Bad rendering?
« on: February 22, 2011, 12:40:35 am »
hm...its a bit hard to explain


basically when i go to run my game, the model looks badly rendered..


thats supposed to be a model, but it looks like its graphically bugged..


heres some code that i used that involves that model:

Code: [Select]
#import ".\WorldMap3Dv1.h"
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glVertexPointer(3, GL_FLOAT, 0, WorldMap3Dv1Verts);
glTexCoordPointer(2, GL_FLOAT, 0, WorldMap3Dv1TexCoords);
glDrawArrays(GL_TRIANGLES, 0, WorldMap3Dv1NumVerts);



at first i thought it was the graphics card not liking it, but when i used this on my main computer it did the same thing..

any ideas now?


Theres spaces between the model, and alot ._.

Extra details: I used an obj2opengl.perl to load the obj file into a header file(.h)

its probably something wrong with that..

7
General / Bad rendering?
« on: February 22, 2011, 12:09:12 am »
hey this is about opengl.

anyone know about this?

http://img208.imageshack.us/i/glitcheo.jpg/

if you know how to solve this then share some knowledge xD

thanks

8
General / Parsing an OBJ
« on: February 19, 2011, 06:44:28 am »
hey im using Perl to convert my obj files so thats not a problem.


BUT

when loading the model, i cant see it ._.


these are what i have used for this

// set input data to arrays
glVertexPointer(3, GL_FLOAT, 0, WorldMap3Dv1Verts);
glTexCoordPointer(2, GL_FLOAT, 0, WorldMap3Dv1TexCoords);

// draw data
glDrawArrays(GL_TRIANGLES, 0, WorldMap3Dv1NumVerts);


also
glEnable(GL_VERTEX_ARRAY);

is there something else im missing?

also i know that its loading because it slows everything down once i enabled

9
General / Parsing an OBJ
« on: February 18, 2011, 02:37:28 am »
i have tried these before(for 2 hrs straight) and everything i tried ended in an undefined error...

i like this one though(http://kixor.net/dev/objloader/)


what should i be linking in this? ._.


also i want it where i dont have these files in my directory...

is that even possible?

if not then ill *sigh* deal with it


EDIT: tried putting in the directory, didnt work >_<


this works: objLoader *World = new objLoader();
then i get undefined for: World->load("test.obj");

the error says: |undefined reference to `objLoader::load(char*)'|

im not delaying my project for another day........

10
General / Parsing an OBJ
« on: February 18, 2011, 01:55:23 am »
hey ive been looking around for a while(3 days) and i cant seem to fined a good way to load my .obj mesh into my c++ game....


does anyone know how to parse an obj file or know any tutorials that can help me?


that would be very nice


what im looking for is maybe a way to get started at least(like an outline of some sort)

thanks in advance  :)

11
General discussions / OpenGL and SFML
« on: February 15, 2011, 06:53:56 pm »
Hiura, im having a hard time figuring what you said out...


this is what i got so far..

Code: [Select]
GLuint _texture[2];
    sf::Image ictexture[2];
    sf::Image itexture[2];
    itexture[0].LoadFromFile("Block.png");
    itexture[1].LoadFromFile("Cursor.png");
    ictexture[1].Copy(itexture[1],10,10,sf::IntRect(0,0,10,10),true);
    ictexture[1].SaveToFile("Graphics/Texture/texture1.png");
    _texture[0] = LoadTexture(itexture[0]);
    _texture[1] = LoadTexture(ictexture[1]);


when doing this i get Console errors saying:

Failed to write PNG image. Reason: image width or height is zero in IHDR
Trying to access the pixels of an empty image<<<i think this is from opengl..

nevermind that, forgot image.create()

12
General discussions / OpenGL and SFML
« on: February 15, 2011, 05:15:40 am »
scratch that other question if it doesnt make sense ._.

how bout a way to use only PART of an image that is loaded for a texture?(width 50 height 50) and using only(25x25) of the image


is THIS possible?

13
General discussions / OpenGL and SFML
« on: February 15, 2011, 04:34:53 am »
hey ive been wondering something..

is it possible to load a sprite as a texture(i got it to work as an image before)

what im trying to do is use a subrect of that image(say its 30x15 and i wanna use ponly 15x15 of it)

heres what i got so far:

Code: [Select]
GLuint LoadTexture(sf::Sprite image)
{
    GLuint Texture;
    glGenTextures(1, &Texture);
    glBindTexture(GL_TEXTURE_2D, Texture);
    gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, 17, 22, GL_RGBA, GL_UNSIGNED_BYTE,image.GetImage().GetPixelsPtr());
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
    return Texture;
}


and in main...

Code: [Select]
GLuint _texture[2];
    sf::Image itexture[2];
    sf::Sprite stexture[2];
    itexture[0].LoadFromFile("Awesome.png");
    itexture[1].LoadFromFile("Graphics/Player Sprite.png");
    stexture[1].SetImage(itexture[1]);
    stexture[1].SetSubRect(sf::IntRect(0,0,17,22));
    //_texture[0] = LoadTexture(itexture[0]);
    _texture[1] = LoadTexture(stexture[1]);


hopefully the code can give you some vision of what will happen

14
General discussions / OpenGL and SFML
« on: February 14, 2011, 04:26:53 am »
ok what you said is very vague to me(might just be me ._.)
and when you say that PNGs work the same, in the tutorial im using, it doesnt let me load other than BMP

also is there seriously no way to use a SFML sprite/image instead?


just something to fill this in:

Code: [Select]
glTexImage2D(GL_TEXTURE_2D,0,GL_RGB,image->width(THIS),image->height(THIS),0,GL_RGB,GL_UNSIGNED_BYTE,image->pixels(AND THIS));

15
General discussions / OpenGL and SFML
« on: February 14, 2011, 03:48:51 am »
hey im at a point where im using textures.


is there a way to use a SFML image/sprite for the texture?

if not then what is a way to laod a PNG? (i like PNGs xD)

the tut i found is only BMP

Pages: [1] 2 3
anything