nickme

Members
  • Content count

    315
  • Joined

  • Last visited

Community Reputation

253 Neutral

About nickme

  • Rank
    Member

Personal Information

  • Interests
    |artist|programmer|
  1. glut only runs at hd? can it run at 4k?

    When I change the windows custom scaling to 100%, the program ran as it is suppose to be. but when I changed the custom scaling to 225%, the program went hay-wired.
  2. glut only runs at hd? can it run at 4k?

    this is the debug func that I wrote: void debug(int x, int y, int vx, int vy, char *c) { const int max = 60; char buf[max]; sprintf_s(buf, max, "[%i|%i] ", vx, vy); strcat_s(buf, c); glDisable(GL_TEXTURE_2D); CUtilities::Msg(x, y, 0, 0, buf, White, Black); // Output debug } and this is the func that I execute: debug(20, 200, glutGet(GLUT_SCREEN_WIDTH), glutGet(GLUT_SCREEN_HEIGHT), "Screen W & H");
  3. glut only runs at hd? can it run at 4k?

    No matter what screen size I set it, the glutGet(GLUT_SCREEN_WIDTH) and glutGet(GLUT_SCREEN_HEIGHT); always return 1707x960 even though I changed it from 4k to 1280x800, why is that?
  4. glut only runs at hd? can it run at 4k?

    When I ran it at 4k, it just fit the whole screen, but when I ran it at 1080p, it still covered the whole screen. Why is that? Is vs c++ auto upscale? thanks for all your help
  5. glut only runs at hd? can it run at 4k?

    no, I can not resize the window. I can't because when I coded it so that it will not run in full screen. When I resized it, it just shrink the graphic but the window would still in its original size and in black background. When it re-rendered, it's back to the original window size. The following image in the middle of the screen is 1280x720 resolution but almost covered the whole 4k screen.
  6. glut only runs at hd? can it run at 4k?

    thanks for your reply. My GPU is radeon rx 480, so I am sure that it support 4k.
  7. My win10 is set at 225% scale and my monitor is 4k. however, when i open a window in glut, the window is covered almost half of the screen. is glut only capable of display hd only? thanks
  8. if I move the errorCheck() one line up, the error was not generated.  why?
  9. hi   I am checking error in my program with the following function: void errorCheck(char * msg) { GLenum errCode; const GLubyte *errString; while ((errCode = glGetError()) != GL_NO_ERROR) { errString = gluErrorString(errCode); printf(">>===>> %s : %s\n", msg, errString); fprintf(file, ">>===>> %s : %s\n", msg, errString); } } and in my codes: glBindBuffer(GL_ARRAY_BUFFER, TexCoordVBOID); glBufferData(GL_ARRAY_BUFFER, 8*sizeof(GLfloat), aTexCoord, GL_STATIC_DRAW); glEnableClientState(GL_TEXTURE_COORD_ARRAY); errorCheck("in init quad"); glTexCoordPointer(2, GL_FLOAT, 2*sizeof(GLfloat), BUFFER_OFFSET(0)); after the     glEnableClientState(GL_TEXTURE_COORD_ARRAY);  it generated the following error:   >>===>> in init quad : invalid operation   why would a glEnableClientState() produced such an error?   thanks in advance for your help.    
  10. GLSL:how to pass values to fragment shader.

    You mean using glReadPixels()?
  11. Hi Servant of the Lord,   thanks for the reply.   the stream variable could had been :                              stream = "\nthis is the 2nd line.\n\nthis is the fifth line.\n\0";   that is the data structure that I have to work with. That is what the Opengl shader compiler understand.   a little history.  I learned coding began in 1980 by taking a C program in college.  after that I had not done any coding after that until a few years ago i started to code again as a hobby.  And all these times i learned C++ by myself.  so sorry for the Cish coding style.   So after using the separate(), how do i print out the whole file?
  12.   thanks for the reply.   can you give me an example of what you would do? 
  13.     I am only writing this small program to use in my Opengl project.  OpenGL shader are written in C.  hence the C codes.
  14.   thanks for the reply.   I am not interested in inputting from a file os ascii of text that end each lines with a '\n' and the end of the string with '\0'.  the string is in that format in the ram, not a file.   However, if you can process the line more efficiently in print_string(), Or in search for the '\n' char with some c++'s func then it would be really greatly appreciated.